<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="shortcut icon" href="/images/splash.jpg" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="/splash.css">

<title>$gatewayname</title>

<!--
Content:
	This Templated Splash page "splash_sitewide.html" is specifically designed to work with the BinAuth script "binauth_sitewide.sh".

	openNDS (NDS), by default, serves a splash page (splash.html)
	when a client device Captive Portal Detection (CPD) process
	attempts to send a port 80 request to the Internet.

	If BinAuth is enabled and set up to use the script file binauth_sitewide.sh (located by default in /usr/lib/opennds/),
	then the configuration option "splashpage" should be set to this splash page file.

	You may either embed css in this file or use a separate .css file
	in the same directory as this file, as demonstrated here.

	It should be noted when designing a custom splash page
	that for security reasons many CPD implementations:
		Immediately close the browser when the client has authenticated.
		Prohibit the use of href links.
		Prohibit downloading of external files
			(including .css and .js).
		Prohibit the execution of javascript.

Authentication:
	A client is authenticated on submitting an HTTP form, method=get,
	passing $authaction, $tok, $redir and optionally $username and $password

	It is also possible to authenticate using an href link to
	$authtarget but be aware that many device Captive Portal Detection
	processes prohibit href links, so this method may not work with
	all client devices.

Available variables:
	$authaction
	$denyaction
	$authtarget
	$clientip
	$clientmac
	$clientupload
	$clientdownload
	$gatewaymac
	$gatewayname
	$maxclients
	$nclients
	$redir
	$tok
	$token
	$uptime
	$version
	$username
	$password
-->

</head>

<body>
<div class="offset">
<med-blue>$gatewayname</med-blue>
<div class="insert">
<big-red>Welcome!</big-red><br>
<italic-black>For access to the Internet, please enter your Username and Password.</italic-black>
<hr>

<form method="get" action="$authaction">
<input type="hidden" name="tok" value="$tok">
<input type="hidden" name="redir" value="$redir">
<input type="text" placeholder="Enter Username" name="username" value="" size="12" maxlength="12">
<br>Username<br><br>
<input type="password" placeholder="Enter Password" name="password" value="" size="12" maxlength="10">
<br>Password<br><br>
<input type="submit" value="Continue">
</form>
	
<hr>

<copy-right>
	<img style="float:left; max-height:5em; height:auto; width:auto" src="/images/splash.jpg" alt="Splash Page: For access to the Internet.">
	<br><br><br>
	Copyright &copy; The openNDS Contributors 2004-2021.<br>
	This software is released under the GNU GPL license.<br>
	openNDS version $version
</copy-right>

</div></div>
</body>
</html>
